<?php

namespace App\Models\System;

use App\Models\BaseModel;
use App\Models\Traits\KfSoftDeletes;
use Illuminate\Support\Facades\DB;

class SystemNoticeImagesModel extends BaseModel
{
    use KfSoftDeletes;
    protected $table = 'system_notice_images';
    protected $dates = ['isDeleted'];


    protected $fillable = [
        'systemNoticeId',
        'image',
        'createdAt',
        'createdByUid',
        'updatedByUid',
        'updatedAt',
        'isDeleted',
        'type',
    ];

    const IMAGE_TYPE_COVER  = 1;
    const IMAGE_TYPE_DETAIL = 2;


    public function addAll(Array $data){
        return DB::table($this->getTable())->insert($data);
    }

}
